import { JSEncrypt } from 'jsencrypt'

export function RSAEncrypt(string: string) {
  const PublicKey:string = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCF3tWrQsPaR2hs/Bu/LfLxDoJr44tFWpg9WhCP5XNldzzx9lc/8CrN+7u3w7B0CB2lQ/rPyJNtRXAqawI+6XtJjUehwruE9gPVPaaTl7jziXX8jJxSFEGxhEavbQrG4lDOvpOW49rqabeSzljgwOMtk8E6rj5vOujBjkiVgDRZ6wIDAQAB'
  const jse = new JSEncrypt();
  jse.setPublicKey(PublicKey);
  return jse.encrypt(string);
}
